home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / upc12bs2.zip / TEST / testsec.c < prev    next >
C/C++ Source or Header  |  1992-11-22  |  1KB  |  48 lines

  1. /*--------------------------------------------------------------------*/
  2. /*     t e s t s e c . c                                              */
  3. /*                                                                    */
  4. /*    Test permissions file for UUPC/extended                         */
  5. /*                                                                    */
  6. /*    Copyright (c) 1991, Andrew H. Derbyshire                        */
  7. /*--------------------------------------------------------------------*/
  8.  
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <string.h>
  12. #include <time.h>
  13.  
  14. #include "lib.h"
  15. #include "expath.h"
  16. #include "hlib.h"
  17. #include "hostable.h"
  18. #include "usertabl.h"
  19. #include "security.h"
  20.  
  21. currentfile();
  22.  
  23. extern struct HostTable *hostp = NULL;
  24. extern struct UserTable *userp = NULL;
  25.  
  26. void main( int argc, char **argv)
  27. {
  28.    configure( B_UUIO );
  29.    checkuser( E_homedir );
  30.    checkreal( E_nodename );
  31.  
  32.    debuglevel = 10;
  33.  
  34.    if (!LoadSecurity())
  35.       panic();
  36.  
  37.    hostp = checkreal( *(++argv) );
  38.    securep = GetSecurity( hostp );
  39.  
  40.    while( --argc > 1 )
  41.    {
  42.       char path[FILENAME_MAX];
  43.  
  44.       ValidateFile( expand_path( strcpy( path, *(++argv)), ".", E_pubdir , NULL),
  45.                     argc % 2 );
  46.    }
  47. } /* main */
  48.